from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
import argparse

def parse_arguments():
    parser = argparse.ArgumentParser()

    # naming / file handling
    parser.add_argument('--id', type=int, default=300, help='file id')
    parser.add_argument('--index', type=int, default=100, help='point id')
    return parser.parse_args()


def neighbor_data_viewer(data,label):
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='3d')
    ax.scatter(data[:,0],data[:,1],data[:,2])
    ax.set_xlabel('X')
    ax.set_ylabel('Y')
    ax.set_zlabel('Z')
    ax.set_title('label:'+str(label))
    plt.show()

if __name__ == '__main__':
    options = parse_arguments()
    data = np.load('../Data/Cow/'+str(options.id)+'_input_data.npy')
    label = np.load('../Data/Cow/'+str(options.id)+'_input_label.npy')
    neighbor_data_viewer(data[options.index],label[options.index])